Skip to content

Commit

Permalink
Fix python indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Jun 11, 2013
1 parent 0fd5fd1 commit 21aecd5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions python/__init__.py
Expand Up @@ -24,16 +24,15 @@
__revision__ = '$Format:%H$'

try:
# Add a __nonzero__ method onto QPyNullVariant so we can check for null values easier.
# >>> value = QPyNullVariant("int")
# >>> if value:
# >>> print "Not a null value"
from types import MethodType
from PyQt4.QtCore import QPyNullVariant
# Add a __nonzero__ method onto QPyNullVariant so we can check for null values easier.
# >>> value = QPyNullVariant("int")
# >>> if value:
# >>> print "Not a null value"
from types import MethodType
from PyQt4.QtCore import QPyNullVariant
def __nonzero__(self):
return False

QPyNullVariant.__nonzero__ = MethodType(__nonzero__, None, QPyNullVariant)
except ImportError:
pass

0 comments on commit 21aecd5

Please sign in to comment.