mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-06-08 13:24:36 +00:00
pep8 style code corrections
This commit is contained in:
@@ -110,7 +110,7 @@ def get_xpath(doc, path):
|
||||
if ret is not None:
|
||||
if type(ret) == list:
|
||||
if len(ret) >= 1:
|
||||
if hasattr(ret[0],'text'):
|
||||
if hasattr(ret[0], 'text'):
|
||||
result = ret[0].text
|
||||
else:
|
||||
result = ret[0]
|
||||
@@ -119,6 +119,7 @@ def get_xpath(doc, path):
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def pretty_mem(val):
|
||||
val = int(val)
|
||||
if val > (10 * 1024 * 1024):
|
||||
@@ -146,8 +147,8 @@ def validate_uuid(val):
|
||||
if form is None:
|
||||
raise ValueError(
|
||||
"UUID must be a 32-digit hexadecimal number. It may take "
|
||||
"the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx or may "
|
||||
"omit hyphens altogether.")
|
||||
"the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx or may "
|
||||
"omit hyphens altogether.")
|
||||
|
||||
else: # UUID had no dashes, so add them in
|
||||
val = (val[0:8] + "-" + val[8:12] + "-" + val[12:16] +
|
||||
|
||||
Reference in New Issue
Block a user