Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
677f3bab
Commit
677f3bab
authored
Jan 30, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core.ppyx: make _flags_to_int() handle comma-separated strings
parent
3444f110
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
gevent/core.ppyx
gevent/core.ppyx
+3
-3
No files found.
gevent/core.ppyx
View file @
677f3bab
...
...
@@ -145,16 +145,16 @@ else:
cpdef unsigned int _flags_to_int(object flags) except? -1:
# Note, that order does not matter, libev has its own predefined order
if
flags is None
:
if
not flags
:
return 0
if isinstance(flags, (int, long)):
return flags
cdef unsigned int result = 0
try:
if isinstance(flags, basestring):
return _flags_str2int[flags.lower()]
flags = flags.split(',')
for value in flags:
result |= _flags_str2int[value.lower()]
result |= _flags_str2int[value.
strip().
lower()]
except KeyError, ex:
raise ValueError('Invalid backend or flag: %s\nPossible values: %s' % (ex, ', '.join(sorted(_flags_str2int.keys()))))
return result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment