|
|
@@ -81,6 +81,12 @@ class Cmdline(object): |
|
|
|
|
|
|
|
def __init__(self, argv = None): |
|
|
|
self.argv = argv or sys.argv[1:] |
|
|
|
try: |
|
|
|
# Assume command line arguments are encoded with stdin's encoding, |
|
|
|
# and reverse it. Won't be needed in Python 3, but for now.. |
|
|
|
self.argv = [ x.decode(sys.stdin.encoding) for x in self.argv ] |
|
|
|
except Exception: # pragma: no cover |
|
|
|
pass |
|
|
|
self.client = None |
|
|
|
self.def_url = os.environ.get("NILMDB_URL", "http://localhost/nilmdb/") |
|
|
|
self.subcmd = {} |
|
|
|