Skip to content

Commit

Permalink
Merge pull request #19 from dsgnr/py3_fix
Browse files Browse the repository at this point in the history
Python3 Bytes conversion fix
  • Loading branch information
dsgnr authored Jul 6, 2021
2 parents 723ae6b + 736e07c commit ff951f5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ disable=missing-docstring,
pointless-statement,
too-many-return-statements,
unused-import,
unused-variable
unused-variable,
consider-using-with


# Enable the message, report, category or checker with the given id(s). You can
Expand Down
12 changes: 6 additions & 6 deletions postfixbuddy.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/usr/bin/env python
# postfixbuddy.py created by Daniel Hand ([email protected])
# postfixbuddy.py created by Daniel Hand ([email protected])
# This is a recreation of pfHandle.perl but in Python.

from __future__ import absolute_import, division, print_function

# Standard Library
import argparse
import os
from os.path import join
import sys
import subprocess
import sys
from os.path import join
from subprocess import call


__version__ = '0.2.0'
__version__ = '0.3.0'


def get_options():
Expand Down Expand Up @@ -50,15 +50,15 @@ def get_options():

# All variables defined in this script reply on finding the queue_directory.
# This defines the PF_DIR variable which is called later on.
PF_DIR = ""
PF_DIR = ''
try:
GET_QUEUE_DIR = subprocess.Popen(['/usr/sbin/postconf',
'-h', 'queue_directory'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
OUTPUT, ERROR = GET_QUEUE_DIR.communicate()
if OUTPUT:
PF_DIR = OUTPUT.split()[0]
PF_DIR = OUTPUT.split()[0].decode('utf-8')
except OSError:
pass

Expand Down
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pylint==1.8.1
pycodestyle==2.5.0
pytest==3.2.3
pylint==2.9.3
pycodestyle==2.7.0
pytest==6.2.4
isort==5.9.1

0 comments on commit ff951f5

Please sign in to comment.