Useless __name__ == '__main__' tests.
--- a/Beremiz_service.py Mon Oct 22 12:58:10 2018 +0200
+++ b/Beremiz_service.py Tue Oct 23 13:31:26 2018 +0200
@@ -142,11 +142,10 @@
WorkingDir = os.getcwd()
argv = [WorkingDir]
-if __name__ == '__main__':
- __builtin__.__dict__['_'] = lambda x: x
- # TODO: add a cmdline parameter if Trying Preloading Xenomai makes problem
- TryPreloadXenomai()
- version()
+__builtin__.__dict__['_'] = lambda x: x
+# TODO: add a cmdline parameter if Trying Preloading Xenomai makes problem
+TryPreloadXenomai()
+version()
def Bpath(*args):
@@ -183,9 +182,8 @@
def unicode_translation(message):
return wx.GetTranslation(message).encode(default_locale)
- if __name__ == '__main__':
- __builtin__.__dict__['_'] = unicode_translation
- # __builtin__.__dict__['_'] = wx.GetTranslation
+ __builtin__.__dict__['_'] = unicode_translation
+ # __builtin__.__dict__['_'] = wx.GetTranslation
# Life is hard... have a candy.