-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from kirill-panoply/synchronize-latest-versions
[PAN-2118] Synchronize latest versions
- Loading branch information
Showing
6 changed files
with
60 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,33 @@ | ||
import logging | ||
from sys import stdout | ||
from traceback import print_exception as _print_exception | ||
|
||
from .datasource import * | ||
from .records import * | ||
from .resources import * | ||
from .sdk import * | ||
from .ssh import SSHTunnel | ||
|
||
logging.basicConfig(stream=stdout, format='%(levelname)s: %(message)s') | ||
|
||
|
||
def custom_excepthook(args): | ||
""" | ||
Handle uncaught Thread.run() exception | ||
and print error text to STDOUT instead of STDERR. | ||
"It's always assumed that | ||
the runnner is single-threaded and synchronuous such that `result` events | ||
are only assigned to the last executed request". | ||
see https://github.com/panoplyio/legacy-source-wrapper/blob/master/src/sources-runner/index.js#L74 | ||
""" | ||
if args.exc_type == SystemExit: | ||
# silently ignore SystemExit | ||
return | ||
|
||
logging.error("Caught an exception in thread:") | ||
_print_exception(args.exc_type, args.exc_value, args.exc_traceback, | ||
file=stdout) | ||
|
||
|
||
threading.excepthook = custom_excepthook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
__version__ = "3.1.4" | ||
__version__ = "3.2.0" | ||
__package_name__ = "panoply-python-sdk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters