Package gammu :: Module exception
[hide private]
[frames] | no frames]

Source Code for Module gammu.exception

 1  # -*- coding: UTF-8 -*- 
 2  # vim: expandtab sw=4 ts=4 sts=4: 
 3  ''' 
 4  Gammu exceptions. 
 5  ''' 
 6  __author__ = 'Michal Čihař' 
 7  __email__ = 'michal@cihar.com' 
 8  __license__ = ''' 
 9  Copyright © 2003 - 2010 Michal Čihař 
10   
11  This program is free software; you can redistribute it and/or modify it 
12  under the terms of the GNU General Public License version 2 as published by 
13  the Free Software Foundation. 
14   
15  This program is distributed in the hope that it will be useful, but WITHOUT 
16  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
17  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 
18  more details. 
19   
20  You should have received a copy of the GNU General Public License along with 
21  this program; if not, write to the Free Software Foundation, Inc., 
22  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
23  ''' 
24   
25  import gammu._gammu 
26   
27  # Import base exception 
28  from gammu._gammu import GSMError 
29   
30  # Import all exceptions 
31  for _name in dir(gammu._gammu): 
32      if not _name.startswith('ERR_'): 
33          continue 
34      _temp = __import__('gammu._gammu', globals(), locals(), [_name], -1) 
35      locals()[_name] = getattr(_temp, _name) 
36   
37  # Cleanup 
38  del _name 
39  del _temp 
40  del gammu 
41