Formatting

This commit is contained in:
shortcutme 2019-11-19 01:40:39 +01:00
parent 0ff1bcfd19
commit a187726ba8
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 7 additions and 3 deletions

View File

@ -47,7 +47,9 @@ if config.action == "main":
browser = webbrowser.get()
else:
browser = webbrowser.get(config.open_browser)
browser.open("http://%s:%s/%s" % (config.ui_ip if config.ui_ip != "*" else "127.0.0.1", config.ui_port, config.homepage), new=2)
browser.open("http://%s:%s/%s" % (
config.ui_ip if config.ui_ip != "*" else "127.0.0.1", config.ui_port, config.homepage
), new=2)
except Exception as err:
print("Error starting browser: %s" % err)
sys.exit()
@ -210,7 +212,10 @@ class Actions(object):
import getpass
privatekey = getpass.getpass("Private key (input hidden):")
try:
succ = site.content_manager.sign(inner_path=inner_path, privatekey=privatekey, update_changed_files=True, remove_missing_optional=remove_missing_optional)
succ = site.content_manager.sign(
inner_path=inner_path, privatekey=privatekey,
update_changed_files=True, remove_missing_optional=remove_missing_optional
)
except Exception as err:
logging.error("Sign error: %s" % Debug.formatException(err))
succ = False
@ -326,7 +331,6 @@ class Actions(object):
print("Downloaded in %.3fs" % (time.time()-s))
def siteNeedFile(self, address, inner_path):
from Site.Site import Site
from Site import SiteManager