← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2147: fix compiling out of the bzr branch

 

------------------------------------------------------------
revno: 2147
committer: poy <poy@xxxxxxxxxx>
branch nick: repo
timestamp: Thu 2010-05-13 15:53:22 +0200
message:
  fix compiling out of the bzr branch
modified:
  dcpp/SConscript


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/SConscript'
--- dcpp/SConscript	2010-04-21 18:39:13 +0000
+++ dcpp/SConscript	2010-05-13 13:53:22 +0000
@@ -8,14 +8,17 @@
 		tree = bzrlib.builtins.WorkingTree.open_containing(env.Dir("#").abspath)[0]
 
 		return tree.branch.revision_id_to_revno(tree.last_revision())
-	except ImportError:
+
+	except:
 		f = None
 		try:
-			f = open(env.Dir("#").abspath+"/.bzr/branch/last-revision",'r')
+			f = open(env.File('#/.bzr/branch/last-revision'), 'r')
 			line = f.read()
 			pos = line.find(' ')
 			if pos > 0:
 				return int(line[:pos])
+		except:
+			pass
 		finally:
 			if f:
 				f.close()