Skip to content

Commit 72eb3ea

Browse files
committed
Log info improvement
1 parent d0f00a0 commit 72eb3ea

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

localization.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,19 @@ def main(argv):
2323
force_update = False
2424
try:
2525
opts, args = getopt.getopt(argv, "hvf", ["version", "force"])
26+
for opt, arg in opts:
27+
if opt == '-h':
28+
usage()
29+
sys.exit()
30+
elif opt in ("-v", "--version"):
31+
version()
32+
sys.exit()
33+
elif opt in ("-f", "--force"):
34+
force_update = True
2635
except getopt.GetoptError:
2736
usage()
2837
sys.exit(2)
29-
for opt, arg in opts:
30-
if opt == '-h':
31-
usage()
32-
sys.exit()
33-
elif opt in ("-v", "--version"):
34-
version()
35-
sys.exit()
36-
elif opt in ("-f", "--force"):
37-
force_update = True
38+
3839
try:
3940
input_file = args[0]
4041
dest_folder = args[1]
@@ -67,6 +68,7 @@ def usage():
6768
def version():
6869
print "version:1.0.0"
6970

71+
7072
def combine_xml(src_folder, dest_folder, force_update):
7173
# find string resouce file in source folder
7274
src_file_list = find_string_resource_files(src_folder)
@@ -97,7 +99,7 @@ def combine_xml(src_folder, dest_folder, force_update):
9799
else:
98100
key = key.strip()
99101
if not value:
100-
print "no value found, skip"
102+
print "I:[%s]no value found, skip" % key
101103
continue
102104
else:
103105
value = value.strip()

0 commit comments

Comments
 (0)