~francesco-marella/specto/fix-sdist

« back to all changes in this revision

Viewing changes to spectlib/watch.py

  • Committer: Jean-François Fortin Tam
  • Date: 2011-06-23 02:52:12 UTC
  • Revision ID: nekohayo@gmail.com-20110623025212-teckd5jqx87yd150
Fix a regression introduced by commit 147.2.5
  
Reintroduce the add watch duplicate detection dialog as a separate dialog

Show diffs side-by-side

added added

removed removed

Lines of Context:
645
645
        finally:
646
646
            f.close()
647
647
 
648
 
    def is_unique_watch(self, name):
 
648
    def already_exists(self, name):
649
649
        """
650
 
        Returns True if the watch is found in the file.
 
650
        Returns True if the watch is found in the watches.list file.
651
651
        """
652
652
        try:
653
653
            self.cfg = ini_namespace(file(self.file_name))
654
 
            if not (self.hide_brackets(name)) in self.cfg._sections:
 
654
            if not self.hide_brackets(name) in self.cfg._sections:
655
655
                return False
656
656
            else:
657
657
                return True