forked from autotest/autotest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note: This change is to support a project that I am working on. You s…
…hould see no change in the behavior of your current Autotest installations. ----- Implement the models and set up the RPC framework for the Test Planner Signed-off-by: James Ren <[email protected]>
- Loading branch information
James Ren
committed
Dec 21, 2009
1 parent
0478e3a
commit f4e03a9
Showing
17 changed files
with
859 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
__author__ = '[email protected] (Steve Howard)' | ||
|
||
import datetime, os | ||
import datetime, os, sys | ||
import django.http | ||
from autotest_lib.frontend.afe import models, model_logic | ||
|
||
|
@@ -620,3 +620,19 @@ def interleave_entries(queue_entries, special_tasks): | |
special_task_index += 1 | ||
|
||
return interleaved_entries | ||
|
||
|
||
def get_sha1_hash(source): | ||
"""Gets the SHA-1 hash of the source string | ||
@param source The string to hash | ||
""" | ||
if sys.version_info < (2,5): | ||
import sha | ||
digest = sha.new() | ||
else: | ||
import hashlib | ||
digest = hashlib.sha1() | ||
|
||
digest.update(source) | ||
return digest.hexdigest() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.