"""
import os
-import subprocess
-import tempfile
import shutil
import pwd
import re
try:
api.commit_files(target_prj, package, commit_files, commit_msg)
except errors.ObsError, exc:
- msger.error('commit packages fail: %s, please check the permission '\
+ msger.error('commit packages fail: %s, please check the permission '
'of target project:%s' % (exc, target_prj))
msger.info('local changes submitted to build server successfully')
import os
import time
-from gitbuildsys import msger, errors
+from gitbuildsys import msger
from gbp.rpm.git import GitRepositoryError, RpmGitRepository
upstream = repo.get_upstream_branch(current_branch)
except GitRepositoryError:
upstream = None
- pass
+
if not args.remote:
if upstream:
args.remote = upstream.split('/')[0]
def build_profile_by_name(self, name):
'''return profile object by a given section'''
if not name.startswith('profile.'):
- raise errors.ConfigError('section name specified by general.profile '
- 'must start with string "profile.": %s' % name)
+ raise errors.ConfigError('section name specified by general.profile'
+ ' must start with string "profile.": %s' % name)
if not self.has_section(name):
raise errors.ConfigError('no such section: %s' % name)
url = URL(addr, user, password)
obsconf = OBSConf(profile, 'obs.%s' % sec, url,
- self.get_optional_item('remotebuild', 'base_prj'),
- self.get_optional_item('remotebuild', 'target_prj'))
+ self.get_optional_item('remotebuild', 'base_prj'),
+ self.get_optional_item('remotebuild', 'target_prj'))
profile.set_obs(obsconf)
repos = self._parse_build_repos()
try:
response = self.core_http(core.http_GET, url).read()
entries = core.ET.fromstring(response)
- break
+ break
except OSCError, err:
raise ObsError("can't get list of sources from"\
" %s/%s: %s" % (prj, pkg, err))
meta['buildconf'])
fname = self.fetch(buildconf_url)
if fname:
- release, buildid = meta['id'].split('_')
+ release, _buildid = meta['id'].split('_')
release = release.replace('-','')
- target_conf = os.path.join(os.path.dirname(fname), '%s.conf' % release)
+ target_conf = os.path.join(os.path.dirname(fname),
+ '%s.conf' % release)
os.rename(fname, target_conf)
self.buildconf = target_conf