Package: python-apptools / 4.5.0-1.1

fix-syntaxwarning.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 7edf8f1659cba92071bfff8134461492b4d89904 Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Tue, 31 Dec 2019 10:35:44 -0500
Subject: [PATCH] Fix SyntaxWarning in file_path.py

Fixes this SyntaxWarning:
/usr/lib/python3/dist-packages/apptools/persistence/file_path.py:70: SyntaxWarni
ng: "is not" with a literal. Did you mean "!="?
  if os.sep is not '/':
---
 apptools/persistence/file_path.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apptools/persistence/file_path.py b/apptools/persistence/file_path.py
index 71932b2d..69227b53 100644
--- a/apptools/persistence/file_path.py
+++ b/apptools/persistence/file_path.py
@@ -67,7 +67,7 @@ def set_relative(self, base_f_name):
         ret = (_src.count(os.sep) * ('..' + os.sep)) + _dst
 
         # Make it posix style.
-        if os.sep is not '/':
+        if os.sep != '/':
             ret.replace(os.sep, '/')
 
         # Store it.