annotate __init__.py @ 52:c66803bff0cc draft

planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit adc1ac50269e02570e7ce12c732637bdd3f9a547-dirty
author yating-l
date Thu, 11 May 2017 17:21:15 -0400
parents 3e0c61b52a06
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
1 # Set default logging handler to avoid "No handler found" warnings.
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
2 import logging
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
3 import sys
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
4
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
5 try: # Python 2.7+
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
6 from logging import NullHandler
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
7 except ImportError:
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
8 class NullHandler(logging.Handler):
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
9 def emit(self, record):
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
10 pass
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
11
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
12 logging.getLogger(__name__).addHandler(NullHandler())
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
13
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
14 log_stdout = None
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
15 log_stderr = None
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
16
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
17
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
18 # TODO: Handle the Exception by dispatching the error depending on the (debug) mode
3e0c61b52a06 planemo upload for repository https://github.com/Yating-L/hub-archive-creator commit a77635b40ebd29baafb3bea57f8cbfb3f252e3b0-dirty
yating-l
parents:
diff changeset
19 #class Exception(Exception):