1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

remove an os.getcwd() call from function arguments, because that call fails when running the program from a directory which doesn't exist anymore, and thus osc would not run at all.

This commit is contained in:
Dr. Peter Poeml 2008-07-16 15:04:37 +00:00
parent cdab0b19ea
commit 2618902347

View File

@ -2231,8 +2231,17 @@ def make_dir(apiurl, project, package, pathname=None, prj_dir=None):
def checkout_package(apiurl, project, package,
revision=None, pathname=None, prj_obj=None,
expand_link=False, prj_dir=os.getcwd()):
olddir = os.getcwd()
expand_link=False, prj_dir=None):
try:
# the project we're in might be deleted.
# that'll throw an error then.
olddir = os.getcwd()
except:
olddir = os.environ.get("PWD")
if not prj_dir:
prj_dir = olddir
if not pathname:
pathname = getTransActPath(os.path.join(prj_dir, package))