PEP8 bis

parent d3233b1f
...@@ -116,9 +116,9 @@ def get_yes_no (prompt,default=None): ...@@ -116,9 +116,9 @@ def get_yes_no (prompt,default=None):
def_value = '' def_value = ''
while True: while True:
answer=raw_input( prompt + " [y,n] %s: " % def_value ) answer=raw_input( prompt + " [y,n] %s: " % def_value )
if answer.upper() in [ 'Y','YES' ]: return True if answer.upper() in [ 'Y', 'YES' ]: return True
if answer.upper() in [ 'N', 'NO' ]: return False if answer.upper() in [ 'N', 'NO' ]: return False
if not default == None : if not default == None:
if answer == '' : return default if answer == '' : return default
# Return OpenSUSE version if it is SuSE # Return OpenSUSE version if it is SuSE
...@@ -420,8 +420,8 @@ class Config: ...@@ -420,8 +420,8 @@ class Config:
self.key_path = key_path self.key_path = key_path
self.master_url = master_url self.master_url = master_url
self.mount_dir_path = mount_dir_path self.mount_dir_path = mount_dir_path
self.temp_dir=temp_dir self.temp_dir = temp_dir
self.computer_id=computer_id self.computer_id = computer_id
def userConfig(self): def userConfig(self):
...@@ -484,15 +484,15 @@ def prepare_from_scratch(config): ...@@ -484,15 +484,15 @@ def prepare_from_scratch(config):
# Prepare Slapos Configuration # Prepare Slapos Configuration
if config.certificates: if config.certificates:
_call(['slapos','node','register',config.computer_name _call(['slapos', 'node', 'register', config.computer_name
,'--interface-name','br0' ,'--interface-name', 'br0'
,'--ipv6-interface',config.ipv6_interface ,'--ipv6-interface', config.ipv6_interface
,'--partition-number',config.partition_amount]) ,'--partition-number', config.partition_amount])
# Prepare for bridge # Prepare for bridge
enable_bridge(slapos_configuration) enable_bridge(slapos_configuration)
computer_id = get_computer_name( computer_id = get_computer_name(
os.path.join('/',slapos_configuration,'slapos.cfg')) os.path.join('/', slapos_configuration, 'slapos.cfg'))
print "Your Computer is : %s" % computer_id print "Your Computer is : %s" % computer_id
......
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