From e7bee61ab8e85070345227f287308bc264c8f40c Mon Sep 17 00:00:00 2001 From: abdul Date: Thu, 28 Mar 2013 02:32:52 -0700 Subject: [PATCH] Handling error when cwd does not exist (#2) --- mongoctl/mongoctl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongoctl/mongoctl.py b/mongoctl/mongoctl.py index a1ea7d4..91ee177 100644 --- a/mongoctl/mongoctl.py +++ b/mongoctl/mongoctl.py @@ -3314,7 +3314,7 @@ def resolve_path(path): path = os.path.abspath(path) except OSError, e: # handle the case where cwd does not exist - if "No such file or directory" in e.message: + if "No such file or directory" in str(e): pass else: raise