summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/clearcase.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/clearcase.py')
-rw-r--r--bitbake/lib/bb/fetch2/clearcase.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/bitbake/lib/bb/fetch2/clearcase.py b/bitbake/lib/bb/fetch2/clearcase.py
index 9ed0d9beaa..1a9c863769 100644
--- a/bitbake/lib/bb/fetch2/clearcase.py
+++ b/bitbake/lib/bb/fetch2/clearcase.py
@@ -49,11 +49,12 @@ User credentials:
#
import os
-import sys
import shutil
import bb
from bb.fetch2 import FetchMethod
from bb.fetch2 import FetchError
+from bb.fetch2 import MissingParameterError
+from bb.fetch2 import ParameterError
from bb.fetch2 import runfetchcmd
from bb.fetch2 import logger
@@ -69,7 +70,7 @@ class ClearCase(FetchMethod):
return ud.type in ['ccrc']
def debug(self, msg):
- logger.debug(1, "ClearCase: %s", msg)
+ logger.debug("ClearCase: %s", msg)
def urldata_init(self, ud, d):
"""
@@ -79,7 +80,7 @@ class ClearCase(FetchMethod):
if 'protocol' in ud.parm:
ud.proto = ud.parm['protocol']
if not ud.proto in ('http', 'https'):
- raise fetch2.ParameterError("Invalid protocol type", ud.url)
+ raise ParameterError("Invalid protocol type", ud.url)
ud.vob = ''
if 'vob' in ud.parm:
@@ -143,18 +144,18 @@ class ClearCase(FetchMethod):
basecmd = "%s %s" % (ud.basecmd, command)
- if command is 'mkview':
+ if command == 'mkview':
if not "rcleartool" in ud.basecmd:
# Cleartool needs a -snapshot view
options.append("-snapshot")
options.append("-tag %s" % ud.viewname)
options.append(ud.viewdir)
- elif command is 'rmview':
+ elif command == 'rmview':
options.append("-force")
options.append("%s" % ud.viewdir)
- elif command is 'setcs':
+ elif command == 'setcs':
options.append("-overwrite")
options.append(ud.configspecfile)
@@ -236,7 +237,7 @@ class ClearCase(FetchMethod):
# Clean clearcase meta-data before tar
- runfetchcmd('tar -czf "%s" .' % (ud.localpath), d, cleanup = [ud.localpath])
+ runfetchcmd('tar -czf "%s" .' % (ud.localpath), d, cleanup = [ud.localpath], workdir = ud.viewdir)
# Clean up so we can create a new view next time
self.clean(ud, d);