Remove redundant use dep validation code that's handled by regular expression
authorZac Medico <zmedico@gentoo.org>
Wed, 30 Jul 2008 06:12:19 +0000 (06:12 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 30 Jul 2008 06:12:19 +0000 (06:12 -0000)
now.

svn path=/main/trunk/; revision=11281

pym/portage/dep.py

index 8630ab77e6315f67ded7f574aa3cec1300d9b819..adbde5f6df6cdd7ab2d0213634d7efd2c1cae94a 100644 (file)
@@ -367,20 +367,16 @@ class _use_dep(object):
                                else:
                                        conditional.enabled.append(
                                                self._validate_flag(x, x[:-1]))
+
                        elif "=" == last_char:
-                               if "-" == first_char:
-                                       raise InvalidAtom("Invalid use dep: '%s'" % (x,))
-                               if "!" == x[-2:-1]:
-                                       raise InvalidAtom("Invalid use dep: '%s'" % (x,))
                                if "!" == first_char:
                                        conditional.not_equal.append(
                                                self._validate_flag(x, x[1:-1]))
                                else:
                                        conditional.equal.append(
                                                self._validate_flag(x, x[:-1]))
+
                        else:
-                               if "!" == first_char:
-                                       raise InvalidAtom("Invalid use dep: '%s'" % (x,))
                                if "-" == first_char:
                                        disabled_flags.append(self._validate_flag(x, x[1:]))
                                else: