Commit 07f24ea9 by Csók Tamás

client: flake8 correction

parent c7a5e821
......@@ -52,7 +52,7 @@ def connect(vm):
break
if not found:
config_file = "%s%s%s" % (os.path.expanduser("~\\.nx\\config\\"),
str(int(time.time()*1000)), ".nxs")
str(int(time.time() * 1000)), ".nxs")
password = nxkey.NXKeyGen(vm.password).getEncrypted()
config = NX_template % {'USERNAME': vm.user, 'PASSWORD': password,
'HOST': vm.host, 'PORT': vm.port}
......@@ -61,7 +61,7 @@ def connect(vm):
f.close()
subprocess.Popen(config_file, shell=True)
elif vm.protocol == "RDP":
listdir = os.path.dirname(os.path.realpath(__file__))+"\\.rdp\\*.rdp"
listdir = os.path.dirname(os.path.realpath(__file__)) + "\\.rdp\\*.rdp"
found = False
full_address = "full address:s:%s:%s" % (vm.host, vm.port)
user = "username:s:%s" % vm.user
......@@ -73,8 +73,8 @@ def connect(vm):
break
if not found:
config_file = "%s%s%s" % ((os.path.dirname(
os.path.realpath(__file__))+"\\.rdp\\"),
str(int(time.time()*1000)), ".rdp")
os.path.realpath(__file__)) + "\\.rdp\\"),
str(int(time.time() * 1000)), ".rdp")
password = binascii.hexlify(win32crypt.CryptProtectData(
u"%s" % vm.password, u'psw', None, None, None, 0))
config = RPD_template % {'USERNAME': vm.user, 'PASSWORD': password,
......
#!/usr/bin/env python
# flake8: noqa
"""Bootstrap setuptools installation
To use setuptools in your package's setup.py, include this
......
......@@ -22,7 +22,8 @@ def parse_arguments():
parser = argparse.ArgumentParser()
parser.add_argument(
"change_architect", type=str,
help="Whether the 32 bit Python version is installed on a 64bit system",
help=("Whether the 32 bit Python version"
"is installed on a 64bit system"),
nargs='?', default=False)
args = parser.parse_args()
return args
......
......@@ -71,7 +71,7 @@ def custom_protocol_register(custom_protocol):
"""
if not isinstance(custom_protocol, OrderedDict):
raise AttributeError
print "\t"+custom_protocol.iterkeys().next()
print "\t" + custom_protocol.iterkeys().next()
try:
custom_arguments = windowsclasses.Struct()
custom_arguments.registry = "HKCR"
......@@ -115,10 +115,10 @@ def main():
location = os.path.join(desktop_path, "CIRCLE Client.url")
shortcut = file(location, 'w')
shortcut.write('[InternetShortcut]\n')
shortcut.write('URL='+args.target)
shortcut.write('URL=' + args.target)
shortcut.close()
else:
shortcut.SetPath(args.location+"cloud.py")
shortcut.SetPath(args.location + "cloud.py")
if args.driver == "chrome":
shortcut.SetArguments("-d chrome")
elif args.driver == "iexplore":
......@@ -126,7 +126,7 @@ def main():
elif args.driver == "opera":
shortcut.SetArguments("-d opera")
shortcut.SetDescription("Tool to use CIRCLE Cloud")
shortcut.SetIconLocation(args.location+"cloud.ico", 0)
shortcut.SetIconLocation(args.location + "cloud.ico", 0)
desktop_path = shell.SHGetFolderPath(
0, shellcon.CSIDL_DESKTOP, 0, 0)
persist_file = shortcut.QueryInterface(
......@@ -143,7 +143,7 @@ def main():
"URL Protocol",
""]),
('circle\\URL Protocol', ""),
('circle\\DefaultIcon', args.location+"cloud.ico"),
('circle\\DefaultIcon', args.location + "cloud.ico"),
('circle\\shell', {'open': {
'command': (
"\"%(prefix)s\pythonw.exe\""
......@@ -151,8 +151,7 @@ def main():
"cloud.py\" " % {
'prefix': sys.exec_prefix,
'location': args.location
}
+ r'"%1"')
} + r'"%1"')
}})
])
custom_protocol_register(custom_protocol)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment