Skip to content

Commit 23b5aea

Browse files
Merge pull request #362 from rookiejet/fix_deprecations
Fix deprecations
2 parents 741a1d9 + 4eda979 commit 23b5aea

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

afew/commands.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import sys
66
import logging
77
import argparse
8+
import os
89

910
from afew.Database import Database
1011
from afew.main import main as inner_main
@@ -131,9 +132,9 @@ def main():
131132
logging.basicConfig(level=loglevel)
132133

133134
sys.path.insert(0, user_config_dir)
134-
for file_name in glob.glob1(user_config_dir, '*.py'):
135+
for file_name in glob.glob(os.path.join(user_config_dir, '*.py')):
135136
logging.info('Importing user filter %r' % (file_name,))
136-
__import__(file_name[:-3], level=0)
137+
__import__(os.path.basename(file_name)[:-3], level=0)
137138

138139
if args.move_mails:
139140
args.mail_move_rules = get_mail_move_rules()

afew/filters/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
import glob
66

77
__all__ = list(filename[:-3]
8-
for filename in glob.glob1(os.path.dirname(__file__), '*.py')
8+
for filename in glob.glob(os.path.join(os.path.dirname(__file__), '*.py'))
99
if filename != '__init__.py')

0 commit comments

Comments
 (0)