Permalink
Browse files

Fix uninitialized variable in gi.require_version()

  • Loading branch information...
martinpitt committed Mar 2, 2011
1 parent 6e7606e commit ad3ab659b83cb985730e19a83651da319d4bcb9c
Showing with 2 additions and 1 deletion.
  1. +2 −1 gi/__init__.py
View
@@ -32,7 +32,8 @@ def require_version(namespace, version):
repository = Repository.get_default()
if namespace in repository.get_loaded_namespaces():
- if repository.get_version(namespace) != version:
+ loaded_version = repository.get_version(namespace)
+ if loaded_version != version:
raise ValueError('Namespace %s is already loaded with version %s' % \
(namespace, loaded_version))

0 comments on commit ad3ab65

Please sign in to comment.