Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3775627
D1700.id4324.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
888 B
Referenced Files
None
Subscribers
None
D1700.id4324.diff
View Options
diff --git a/_modules/jails.py b/_modules/jails.py
--- a/_modules/jails.py
+++ b/_modules/jails.py
@@ -10,6 +10,9 @@
# -------------------------------------------------------------
+import errno
+
+
def _get_all_jails():
return __pillar__.get('jails', {})
@@ -70,7 +73,7 @@
interfaces = _get_hardware_network_interfaces()
if len(interfaces) < 1:
- raise "No network interface detected."
+ raise OSError(errno.ENODEV, "No network interface detected.")
# Nasqueron convention assigns the ICANNN network
# to the first card.
@@ -97,11 +100,7 @@
return interface
- raise "No network interface detected."
-
- # Nasqueron convention assigns the ICANNN network
- # to the first card.
- return interfaces[0]
+ raise OSError(errno.EAFNOSUPPORT, "No network interface detected.")
def get(jailname, group=None):
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 19:07 (21 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2262766
Default Alt Text
D1700.id4324.diff (888 B)
Attached To
Mode
D1700: Use OSError exceptions instead of dead exceptions
Attached
Detach File
Event Timeline
Log In to Comment