Skip to content

Commit

Permalink
be tolerant of tarfile behavior changes in 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin J. Mitchell committed Aug 25, 2010
1 parent 87fbf3d commit 4507199
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion slave/buildslave/test/unit/test_commands_transfer.py
Expand Up @@ -241,7 +241,8 @@ def check_tarfile(_):
f = StringIO.StringIO(self.fakemaster.data)
a = tarfile.open(fileobj=f, name='check.tar')
exp_names = [ '.', 'aa', 'bb' ]
got_names = sorted([ n.rstrip('/') for n in a.getnames() ])
got_names = [ n.rstrip('/') for n in a.getnames() ]
got_names = sorted([ n or '.' for n in a.getnames() ]) # py27 uses '' instead of '.'
self.assertEqual(got_names, exp_names, "expected archive contents")
a.close()
f.close()
Expand Down

0 comments on commit 4507199

Please sign in to comment.