summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-04-28 14:32:31 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-04-28 14:32:31 +0200
commited9ac7c472f724d76e07661f9c2e3084240786a7 (patch)
treef64caa6ab057ab9acb79875ca6a4602ed022f09e /lib
parenta61640475b9ee9140cc25b7d0a8ce12ed19ce1f2 (diff)
support name suffixes
Diffstat (limited to 'lib')
-rw-r--r--lib/Kratos/DFADriver.pm8
-rwxr-xr-xlib/dfatool.py2
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/Kratos/DFADriver.pm b/lib/Kratos/DFADriver.pm
index b59dec1..ea37956 100644
--- a/lib/Kratos/DFADriver.pm
+++ b/lib/Kratos/DFADriver.pm
@@ -1078,7 +1078,13 @@ sub archive_files {
)
);
- $tar->write("../data/$self->{lp}{timestamp}_$self->{class_name}.tar");
+ my $filename = "../data/$self->{lp}{timestamp}_$self->{class_name}";
+ if ($self->{filename_suffix}) {
+ $filename .= '_' . $self->{filename_suffix};
+ }
+ $filename .= '.tar';
+
+ $tar->write($filename);
return $self;
}
diff --git a/lib/dfatool.py b/lib/dfatool.py
index 3def392..66be4fd 100755
--- a/lib/dfatool.py
+++ b/lib/dfatool.py
@@ -15,6 +15,8 @@ def running_mean(x, N):
return (cumsum[N:] - cumsum[:-N]) / N
def is_numeric(n):
+ if n == None:
+ return False
try:
int(n)
return True