Skip to content

Commit

Permalink
use deprecated sha module, since hashlib doesn't exist in 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Dec 10, 2010
1 parent 183c5ef commit cde7b56
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions slave/buildslave/commands/repo.py
Expand Up @@ -14,18 +14,13 @@
# Copyright Buildbot Team Members

import os
import sha

from twisted.internet import defer

from buildslave.commands.base import SourceBaseCommand
from buildslave import runprocess

try:
from hashlib import sha1
except ImportError:
import sha
sha1 = sha.new

class Repo(SourceBaseCommand):
"""Repo specific VC operation. In addition to the arguments
handled by SourceBaseCommand, this command reads the following keys:
Expand Down Expand Up @@ -160,6 +155,6 @@ def _doDownload(self, dummy):
def parseGotRevision(self):
command = ['manifest', '-o', '-']
def _parse(res):
return sha1(self.command.stdout).hexdigest()
return sha.new(self.command.stdout).hexdigest()
return self._repoCmd(command, _parse, keepStdout=True)

0 comments on commit cde7b56

Please sign in to comment.