diff --git a/scripts/item_icon.pandora.py b/scripts/item_icon.pandora.py index 273edccd..4681c555 100755 --- a/scripts/item_icon.pandora.py +++ b/scripts/item_icon.pandora.py @@ -60,11 +60,11 @@ def main(): parser.add_option('-l', '--timeline', dest='timeline', help='Timeline (image file to be read)') parser.add_option('-i', '--icon', dest='icon', help='Icon (image file to be written)') (options, args) = parser.parse_args() - if options.icon == None: + if options.icon is None: parser.print_help() sys.exit() render_icon(options.frame, options.timeline, options.icon) + if __name__ == "__main__": main() - diff --git a/scripts/list_icon.pandora.py b/scripts/list_icon.pandora.py index 1720efe5..f3928095 100755 --- a/scripts/list_icon.pandora.py +++ b/scripts/list_icon.pandora.py @@ -52,7 +52,7 @@ def main(): parser.add_option('-f', '--frames', dest='frames', help='Poster frames (image files to be read)', default='') parser.add_option('-o', '--icon', dest='icon', help='Icon (image file to be written)') (options, args) = parser.parse_args() - if options.icon == None: + if options.icon is None: parser.print_help() sys.exit() @@ -60,6 +60,6 @@ def main(): render_list_icon(frames, options.icon) + if __name__ == "__main__": main() - diff --git a/scripts/poster.0xdb.py b/scripts/poster.0xdb.py index efc29ab8..dd925f16 100755 --- a/scripts/poster.0xdb.py +++ b/scripts/poster.0xdb.py @@ -223,6 +223,6 @@ def main(): data = json.load(f) render_poster(data, options.poster) + if __name__ == "__main__": main() - diff --git a/scripts/poster.indiancinema.py b/scripts/poster.indiancinema.py index ad18917f..6947f9cc 100755 --- a/scripts/poster.indiancinema.py +++ b/scripts/poster.indiancinema.py @@ -225,6 +225,6 @@ def main(): render_poster(data, options.poster) + if __name__ == "__main__": main() - diff --git a/scripts/poster.padma.py b/scripts/poster.padma.py index 58abdac4..0434b5c1 100755 --- a/scripts/poster.padma.py +++ b/scripts/poster.padma.py @@ -67,6 +67,7 @@ def render_poster(data, poster): drawText(poster_image, ((poster_width - text_size[0]) / 2, text_top + (text_height - text_size[1]) / 2), text, font_file, font_size, poster_color) poster_image.save(poster) + def main(): parser = OptionParser() parser.add_option('-d', '--data', dest='data', help='json file with metadata', default=None) @@ -84,6 +85,6 @@ def main(): data = json.load(f) render_poster(data, options.poster) + if __name__ == "__main__": main() - diff --git a/scripts/poster.pandora.py b/scripts/poster.pandora.py index 29956b5c..ccd43767 100755 --- a/scripts/poster.pandora.py +++ b/scripts/poster.pandora.py @@ -158,6 +158,6 @@ def main(): data = json.load(f) render_poster(data, options.poster) + if __name__ == "__main__": main() -