Cleanup

parent 710b0387
...@@ -39,7 +39,7 @@ import sys ...@@ -39,7 +39,7 @@ import sys
import tempfile import tempfile
# create console handler and set level to debug # create console handler and set level to warning
ch = logging.StreamHandler() ch = logging.StreamHandler()
ch.setLevel(logging.WARNING) ch.setLevel(logging.WARNING)
# create formatter # create formatter
...@@ -291,10 +291,6 @@ def update_machine(config): ...@@ -291,10 +291,6 @@ def update_machine(config):
os.system('reboot') os.system('reboot')
# Class containing all parameters needed for configuration # Class containing all parameters needed for configuration
class Config: class Config:
def setConfig(self, option_dict): def setConfig(self, option_dict):
...@@ -348,8 +344,6 @@ class Config: ...@@ -348,8 +344,6 @@ class Config:
self.logger.debug( "Last upgrade : %s" % self.last_upgrade) self.logger.debug( "Last upgrade : %s" % self.last_upgrade)
def main(): def main():
"""Update computer and slapos""" """Update computer and slapos"""
usage = "usage: %s [options] " % sys.argv[0] usage = "usage: %s [options] " % sys.argv[0]
......
...@@ -95,7 +95,7 @@ def upload_network_cached_from_file(path, networkcache_options): ...@@ -95,7 +95,7 @@ def upload_network_cached_from_file(path, networkcache_options):
'timestamp':time.time(), 'timestamp':time.time(),
} }
try: try:
helper_upload_network_cached_from_file( if helper_upload_network_cached_from_file(
path=path, path=path,
directory_key='slapos-upgrade', directory_key='slapos-upgrade',
metadata_dict=metadata_dict, metadata_dict=metadata_dict,
...@@ -108,8 +108,8 @@ def upload_network_cached_from_file(path, networkcache_options): ...@@ -108,8 +108,8 @@ def upload_network_cached_from_file(path, networkcache_options):
shacache_key_file=networkcache_options.get('shacache-key-file'), shacache_key_file=networkcache_options.get('shacache-key-file'),
shadir_cert_file=networkcache_options.get('shadir-cert-file'), shadir_cert_file=networkcache_options.get('shadir-cert-file'),
shadir_key_file=networkcache_options.get('shadir-key-file'), shadir_key_file=networkcache_options.get('shadir-key-file'),
) ):
print 'Uploaded git repository to cache.' print 'Uploaded update file to cache.'
except Exception: except Exception:
print 'Unable to upload to cache:\n%s.' % traceback.format_exc() print 'Unable to upload to cache:\n%s.' % traceback.format_exc()
......
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 to comment