From e6adaf866920ee414bdf732047859d74991e1cb9 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sat, 16 Oct 2010 00:37:04 -0700 Subject: Do not fail if adding a field that does not exist. --- omptagger | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'omptagger') diff --git a/omptagger b/omptagger index 75a0b90..074c4fb 100755 --- a/omptagger +++ b/omptagger @@ -120,7 +120,12 @@ class Metadata field.upcase! - @tags[field] << value + if @tags.has_key?(field) + @tags[field] << value + else + @tags[field] = value + end + output(field, value) @write = true -- cgit v1.2.3-70-g09d2