git://git.onelab.eu
/
util-vserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c68cf01
)
work without vnet
author
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Fri, 13 Jul 2007 15:16:18 +0000
(15:16 +0000)
committer
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Fri, 13 Jul 2007 15:16:18 +0000
(15:16 +0000)
python/bwlimit.py
patch
|
blob
|
history
diff --git
a/python/bwlimit.py
b/python/bwlimit.py
index
8fb6159
..
6892089
100644
(file)
--- a/
python/bwlimit.py
+++ b/
python/bwlimit.py
@@
-46,7
+46,7
@@
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: bwlimit.py,v 1.1
4 2006/12/13 21:48:14 faiyaza
Exp $
+# $Id: bwlimit.py,v 1.1
5 2007/02/07 04:21:11 mlhuang
Exp $
#
import sys, os, re, getopt
#
import sys, os, re, getopt
@@
-349,7
+349,10
@@
def init(dev = dev, bwcap = bwmax):
# by root end up here and are capped at the node bandwidth
# cap.
on(root_xid, dev, share = root_share)
# by root end up here and are capped at the node bandwidth
# cap.
on(root_xid, dev, share = root_share)
- file("/proc/sys/vnet/root_class", "w").write("%d" % ((1 << 16) | default_minor | root_xid))
+ try:
+ file("/proc/sys/vnet/root_class", "w").write("%d" % ((1 << 16) | default_minor | root_xid))
+ except:
+ pass
# Set up the default class. Packets that fail classification end
# up here.
# Set up the default class. Packets that fail classification end
# up here.