~landscape/landscape-client/staging

« back to all changes in this revision

Viewing changes to scripts/landscape-sysinfo

  • Committer: Simon Poirier
  • Date: 2017-08-17 23:23:07 UTC
  • mfrom: (0.1.996)
  • Revision ID: simon.poirier@canonical.com-20170817232307-6je8sd48dh7731s2
Merged from master r996

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
import sys, os
3
 
 
4
 
try:
5
 
    if os.path.dirname(os.path.abspath(sys.argv[0])) == os.path.abspath("scripts"):
6
 
        sys.path.insert(0, "./")
7
 
    else:
8
 
        from landscape.lib.warning import hide_warnings
9
 
        hide_warnings()
10
 
 
11
 
    from twisted.internet import reactor
12
 
 
13
 
    from landscape.sysinfo.deployment import run
14
 
except ImportError:
15
 
    # For some reasons the libraries are not importable for now. We are
16
 
    # probably during an upgrade procedure, so let's exit, expecting the
17
 
    # dependencies to be fixed at next run.
18
 
    sys.exit(2)
19
 
 
20
 
 
21
 
if __name__ == "__main__":
22
 
    run(sys.argv[1:], reactor)