Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1531d78

Browse files
committed
Now finally, tests should be working on travis too.
Now handling the new exception BadName as well
1 parent1d52f98 commit1531d78

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎git/refs/symbolic.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
assure_directory_exists
99
)
1010

11-
fromgitdb.excimportBadObject
11+
fromgitdb.excimport (
12+
BadObject,
13+
BadName
14+
)
1215
fromgitdb.utilimport (
1316
join,
1417
dirname,
@@ -201,7 +204,7 @@ def set_commit(self, commit, logmsg=None):
201204
else:
202205
try:
203206
invalid_type=self.repo.rev_parse(commit).type!=Commit.type
204-
exceptBadObject:
207+
except(BadObject,BadName):
205208
raiseValueError("Invalid object: %s"%commit)
206209
# END handle exception
207210
# END verify type
@@ -283,7 +286,7 @@ def set_reference(self, ref, logmsg=None):
283286
try:
284287
obj=self.repo.rev_parse(ref+"^{}")# optionally deref tags
285288
write_value=obj.hexsha
286-
exceptBadObject:
289+
except(BadObject,BadName):
287290
raiseValueError("Could not extract object from %s"%ref)
288291
# END end try string
289292
else:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp