1 |
slords |
1.1 |
diff -Nur plague-0.4.4.1-orig/server/PackageJob.py plague-0.4.4.1/server/PackageJob.py |
2 |
|
|
--- plague-0.4.4.1-orig/server/PackageJob.py 2006-03-13 05:10:49.000000000 +0100 |
3 |
|
|
+++ plague-0.4.4.1/server/PackageJob.py 2007-11-14 21:53:48.000000000 +0100 |
4 |
|
|
@@ -21,7 +21,8 @@ |
5 |
|
|
import commands |
6 |
|
|
import threading |
7 |
|
|
import time |
8 |
|
|
-import rpmUtils |
9 |
|
|
+import rpmUtils.transaction |
10 |
|
|
+import rpmUtils.miscutils |
11 |
|
|
import exceptions |
12 |
|
|
import shutil |
13 |
|
|
import copy |
14 |
|
|
@@ -47,11 +48,11 @@ |
15 |
|
|
print stuff |
16 |
|
|
|
17 |
|
|
class PrepError(exceptions.Exception): |
18 |
|
|
- def __init__(self, args=None): |
19 |
|
|
+ def __init__(self, msg): |
20 |
|
|
exceptions.Exception.__init__(self) |
21 |
|
|
- self.args = args |
22 |
|
|
+ self.msg = msg |
23 |
|
|
def __str__(self): |
24 |
|
|
- return self.args |
25 |
|
|
+ return self.msg |
26 |
|
|
|
27 |
|
|
class BuildError(exceptions.Exception): |
28 |
|
|
def __init__(self, msg, arch): |
29 |
|
|
@@ -553,8 +554,8 @@ |
30 |
|
|
if self.use_cvs == True: |
31 |
|
|
shutil.rmtree(self.checkout_tmpdir, ignore_errors=True) |
32 |
|
|
subj = 'Prep Error (Job %s): %s on %s' % (self.uid, self._source, self._target_str) |
33 |
|
|
- self.email_result(self.username, resultstring=e.args, subject=subj) |
34 |
|
|
- self._stage_failed(e.args) |
35 |
|
|
+ self.email_result(self.username, resultstring=e.msg, subject=subj) |
36 |
|
|
+ self._stage_failed(e.msg) |
37 |
|
|
except BuildError, e: |
38 |
|
|
subj = 'Build Error (Job %s): %s on %s' % (self.uid, self._source, self._target_str) |
39 |
|
|
base_url = self._server_cfg.get_str("UI", "log_url") |