@@ -39,7 +39,6 @@ def method(*args, **kwargs):
39
39
"Ensure environment variables are properly configured in Ansible for use with ZOAU."
40
40
)
41
41
)
42
-
43
42
return method
44
43
45
44
@@ -81,30 +80,25 @@ def __getattr__(self, name):
81
80
and instead return a method that will alert the user that there was
82
81
an error while importing ZOAU.
83
82
"""
84
- def method (* args , ** kwargs ):
85
- """Raises ImportError as a result of a failed ZOAU import.
83
+ """Raises ImportError as a result of a failed ZOAU import.
86
84
87
- Parameters
88
- ----------
89
- *args : dict
90
- Arguments ordered in a dictionary.
91
- **kwargs : dict
92
- Arguments ordered in a dictionary.
85
+ Parameters
86
+ ----------
87
+ name : str
88
+ Value of object not properly imported.
93
89
94
- Raises
95
- ------
96
- ImportError
97
- Unable to import a module or library.
98
- """
99
- raise ImportError (
100
- (
101
- "ZOAU is not properly configured for Ansible. Unable to import zoautil_py. "
102
- "Ensure environment variables are properly configured in Ansible for use with ZOAU. "
103
- "Complete traceback: {0}" .format (self .traceback )
104
- )
90
+ Raises
91
+ ------
92
+ ImportError
93
+ Unable to import a module or library.
94
+ """
95
+ raise ImportError (
96
+ (
97
+ "ZOAU is not properly configured for Ansible. Unable to import zoautil_py. "
98
+ "Ensure environment variables are properly configured in Ansible for use with ZOAU. "
99
+ "Complete traceback: {0}" .format (self .traceback )
105
100
)
106
-
107
- return method
101
+ )
108
102
109
103
110
104
class MissingImport (object ):
@@ -124,21 +118,16 @@ def __init__(self, import_name=""):
124
118
self .import_name = import_name
125
119
126
120
def __getattr__ (self , name ):
127
- def method (* args , ** kwargs ):
128
- """Raises ImportError as a result of trying to import a missing module.
129
-
130
- Parameter
131
- ---------
132
- *args : dict
133
- Arguments ordered in a dictionary.
134
- **kwargs : dict
135
- Arguments ordered in a dictionary.
121
+ """Raises ImportError as a result of trying to import a missing module.
136
122
137
- Raises
138
- ------
139
- ImportError
140
- Unable to import a module or library.
141
- """
142
- raise ImportError ("Import {0} was not available." .format (self .import_name ))
123
+ Parameter
124
+ ---------
125
+ name : str
126
+ Value of object not properly imported.
143
127
144
- return method
128
+ Raises
129
+ ------
130
+ ImportError
131
+ Unable to import a module or library.
132
+ """
133
+ raise ImportError ("Import {0} was not available." .format (self .import_name ))
0 commit comments