Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: utils/zip_package.py

Issue 25549003: Fix running 'import run_isolated' at python interactive prompt. (Closed) Base URL: https://chromium.googlesource.com/a/chromium/tools/swarm_client@1_update_item
Patch Set: Added comment Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/net.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/zip_package.py
diff --git a/utils/zip_package.py b/utils/zip_package.py
index bdd660ad009e81c8b40abada29e1fbfe760fa2d7..5ea35fcdce9b1482805d34d81919e0d60eb9d2c8 100755
--- a/utils/zip_package.py
+++ b/utils/zip_package.py
@@ -237,7 +237,7 @@ def get_main_script_path():
"""
# If running from interactive console __file__ is not defined.
main = sys.modules['__main__']
- return get_module_zip_archive(main) or getattr(main, '__file__')
+ return get_module_zip_archive(main) or getattr(main, '__file__', None)
def extract_resource(package, resource):
« no previous file with comments | « utils/net.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698