from manifest_json_parser import ManifestJsonParser
+
def CopyToPathWithName(root, name, final_path, rename):
if name == '':
return False
origin_path = os.path.join(root, name)
if not os.path.exists(origin_path):
- print ('Error: \'' + origin_path + '\' not found.' )
+ print('Error: \'' + origin_path + '\' not found.')
sys.exit(6)
if not os.path.exists(final_path):
os.makedirs(final_path)
if not has_image:
closest = ''
delta = sys.maxint
- for (k , v) in image_dict.items():
+ for(k, v) in image_dict.items():
items = k.split('x')
if len(items) == 2:
float_value = sys.maxint
for image_pair in image_list:
items = image_pair.strip().split(' ')
if len(items) >= 2:
- x = items[len(items)-1]
+ x = items[len(items) - 1]
image_item = items[0]
image_dict[x] = image_item
content = content.replace('<!-- Background Image -->', tmp, 1)
has_background = True
if has_background:
- background_file = file(background_path,'w')
+ background_file = file(background_path, 'w')
background_file.write(content)
background_file.close()
return has_background