Mercurial > repos > yating-l > hubarchivecreator
annotate __init__.py @ 71:b724e559907e draft
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 92e6dc28cbc0253b964b2cf594320042d8cd9524-dirty
author | yating-l |
---|---|
date | Wed, 27 Sep 2017 11:15:44 -0400 |
parents | 3e0c61b52a06 |
children |
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): |