Fwd: [ditrack commit] r839 - in src/trunk/DITrack: . Command

Oleg Sharov o.sharov at gmail.com
Thu Nov 16 11:40:53 PST 2006


---------- Forwarded message ----------
From: oleg at ditrack.org <oleg at ditrack.org>
Date: 15.11.2006 23:54
Subject: [ditrack commit] r839 - in src/trunk/DITrack: . Command
To: commit at ditrack.org

Author: oleg
Date: 2006-11-15 12:54:19 -0800 (Wed, 15 Nov 2006)
New Revision: 839

Modified:
   src/trunk/DITrack/Command/list.py
   src/trunk/DITrack/DB.py
Log:
commit of intermediate result of move filter's class to DITrack.DB


Modified: src/trunk/DITrack/Command/list.py
===================================================================
@@ -127,12 +46,16 @@

        filters = []
        for e in opts.fixed[1:]:
-           try:
-               f = Filter(db, e)
-           except DITrack.Command.list.FilterUnknownError:
-               DITrack.Util.common.err("ERROR: filter '%s' is not defined"
\
-                   % e)

+           if e in db.cfg.filters:
+               f = db.cfg.filters[e]
+           else:
+               try:
+                   f = DITrack.DB.Filter(e)
+               except:
+                   DITrack.Util.common.err("ERROR: '%s' is not predefined
filter or it contains syntax error" \
+                       % e)
+
            filters.append(f)

         for id, issue in db.issues():

After my changes we have double error, and loss overt error about undefined
filter.
As a user of system, I consider it's bad.But, as a programmer, I don't know
other solution


Vlad, what's your opinion?

-- 
Oleg Sharov
o.sharov at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ditrack.org/pipermail/dev/attachments/20061116/e3ef44b7/attachment.html 


More information about the Dev mailing list