summaryrefslogtreecommitdiffstats
path: root/fb.py
diff options
context:
space:
mode:
Diffstat (limited to 'fb.py')
-rwxr-xr-xfb.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/fb.py b/fb.py
index 976ad49..40648d0 100755
--- a/fb.py
+++ b/fb.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python
-from enum import Enum
import argparse
import collections
import contextlib
@@ -22,6 +21,12 @@ import xdg.BaseDirectory
from io import BytesIO
+class Enum(set):
+ def __getattr__(self, name):
+ if name in self:
+ return name
+ raise AttributeError
+
# Source: http://stackoverflow.com/a/434328/953022
def chunker(seq, size):
return (seq[pos:pos + size] for pos in range(0, len(seq), size))
@@ -335,7 +340,7 @@ class FBClient:
if version.startswith('@'):
version = 'unknown-version'
- modes = Enum("modes", [
+ modes = Enum([
"upload",
"delete",
"get",