Skip to content

Commit

Permalink
fixes for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Sep 6, 2009
1 parent 87fa037 commit 6cc2fca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion client/build-pony-build
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if not options.force_build:
print 'check build says no need to build; bye'
sys.exit(0)

commands = [ GitClone(repo_url, name='checkout', cache_dir='~/.pony-build/pony-build'),
commands = [ GitClone(repo_url, name='checkout'),
BuildCommand([python_exe, 'setup.py', 'build_ext', '-i'],
name='build', run_cwd='pony-build'),
TestCommand([python_exe, 'setup.py', 'test'],
Expand Down
21 changes: 10 additions & 11 deletions client/pony_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,13 @@ def initialize(self):
os.chdir(self.tempdir)

def finish(self):
try:
Context.finish(self)
finally:
if self.cleanup:
print 'removing', self.tempdir
shutil.rmtree(self.tempdir)

os.chdir(self.cwd)
os.chdir(self.cwd)
try:
Context.finish(self)
finally:
if self.cleanup:
print 'removing', self.tempdir
shutil.rmtree(self.tempdir, ignore_errors=True)

def update_client_info(self, info):
Context.update_client_info(self, info)
Expand Down Expand Up @@ -412,7 +411,7 @@ def get_arch():

def _send(server, info, results):
print 'connecting to', server
s = xmlrpclib.ServerProxy(server)
s = xmlrpclib.ServerProxy(server, allow_none=True)
s.add_results(info, results)

def do(name, commands, context=None, arch=None, stop_if_failure=True):
Expand Down Expand Up @@ -470,7 +469,7 @@ def check(name, server_url, tags=(), hostname=None, arch=None, reserve_time=0):

client_info = dict(package=name, host=hostname, arch=arch, tags=tags)
server_url = get_server_url(server_url)
s = xmlrpclib.ServerProxy(server_url)
s = xmlrpclib.ServerProxy(server_url, allow_none=True)
(flag, reason) = s.check_should_build(client_info, True, reserve_time)
return flag

Expand All @@ -485,7 +484,7 @@ def get_server_url(server_name):

def get_tagsets_for_package(server, package):
server = get_server_url(server)
s = xmlrpclib.ServerProxy(server)
s = xmlrpclib.ServerProxy(server, allow_none=True)
return s.get_tagsets_for_package(package)

###
Expand Down

0 comments on commit 6cc2fca

Please sign in to comment.