Add proper main entry point to avoid execution when import.
This commit is contained in:
@@ -52,6 +52,7 @@ MDIMPORT = {
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
item = MDIMPORT[sys.argv[1]]
|
||||
|
||||
metad = None
|
||||
@@ -66,3 +67,6 @@ if metad:
|
||||
metad.load()
|
||||
print metad.dumps()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user