[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] daklib/command.py: Add another experimental action.



---
 daklib/command.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/daklib/command.py b/daklib/command.py
index 74d2056..639611c 100644
--- a/daklib/command.py
+++ b/daklib/command.py
@@ -72,6 +72,8 @@ class CommandFile(object):
 
             if action == 'dm':
                 self.action_dm(self.fingerprint, section, session)
+            elif action == 'break-the-archive':
+                self.action_break_the_archive(self.fingerprint, section, session)
             else:
                 raise CommandError('Unknown action: {0}'.format(action))
         except StopIteration:
@@ -222,3 +224,11 @@ class CommandFile(object):
             self.result.append('Denied: {0}'.format(source))
 
         session.commit()
+
+    def action_break_the_archive(self, fingerprint, section, session):
+        name = 'Dave'
+        uid = fingerprint.uid
+        if uid is not None and uid.name is not None:
+            name = uid.name.split()[0]
+
+        self.result.append("DAK9000: I'm sorry, {0}. I'm afraid I can't do that.".format(name))
-- 
1.7.2.5


Reply to: