Permalink
Browse files

Change way how to work with python team module.

example:
  import team
  t = team.team(team_name)

Signed-off-by: Jiří Župka <jzupka@redhat.com>
  • Loading branch information...
1 parent 24e0978 commit 83b258c61a3551a2e0ccf6e063ceb6cd00cf007f Jiří Župka committed with Jiri Pirko Oct 19, 2011
Showing with 9 additions and 2 deletions.
  1. +1 −1 binding/python/team/__init__.py
  2. +8 −1 binding/python/team/core.py
@@ -1 +1 @@
-import core
+from core import *
@@ -1 +1,8 @@
-import capi
+import capi
+
+class team:
+ def __init__(self,team_name):
+ self.th = capi.team_alloc()
+ err = capi.team_init(self.th, team_name)
+ if err:
+ raise Exception("Team init failed.")

0 comments on commit 83b258c

Please sign in to comment.