--- /dev/null
+diff -urN pygtail-0.8.0.org/pygtail/core.py pygtail-0.8.0/pygtail/core.py
+--- pygtail-0.8.0.org/pygtail/core.py 2018-03-10 17:34:16.000000000 +0100
++++ pygtail-0.8.0/pygtail/core.py 2018-04-05 09:26:52.894624325 +0200
+@@ -182,7 +182,7 @@
+ if self.on_update:
+ self.on_update()
+ offset = self._filehandle().tell()
+- inode = stat(self.filename).st_ino
++ inode = fstat(self._filehandle().fileno()).st_ino
+ fh = open(self._offset_file, "w")
+ fh.write("%s\n%s\n" % (inode, offset))
+ fh.close()
Summary: Reads log file lines that have not been read
Name: python-%{pypi_name}
Version: 0.8.0
-Release: 1
+Release: 2
License: GPL v2
Group: Libraries/Python
Source0: https://github.com/bgreenlee/pygtail/archive/%{version}.tar.gz
# Source0-md5: 504ffc804e83a4dd09e20546990b1d43
+Patch0: python-pygtail-bug-38.patch
URL: https://github.com/bgreenlee/pygtail
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%prep
%setup -q -n %{pypi_name}-%{version}
+%patch0 -p1
+
sed -i -e 's#0\.7\.0#0\.8\.0#g' pygtail/core.py
%build