glusterfs/0549-geo-rep-Change-in-attribute-for-getting-function-nam.patch
Gluster Jenkins af562eab56 autobuild v6.0-57
Related: rhbz#2055630
Resolves: bz#1600379 bz#1689375 bz#1782428 bz#1798897 bz#1815462
Resolves: bz#1889966 bz#1891403 bz#1901468 bz#1903911 bz#1908635
Resolves: bz#1917488 bz#1918018 bz#1919132 bz#1925425 bz#1927411
Resolves: bz#1927640 bz#1928676 bz#1942816 bz#1943467 bz#1945143
Resolves: bz#1946171 bz#1957191 bz#1957641
Signed-off-by: Gluster Jenkins <dkhandel+glusterjenkins@redhat.com>
2022-02-28 21:15:34 +02:00

46 lines
1.6 KiB
Diff

From f90c13912a9c64e4479b55fee4ba4ac50e509302 Mon Sep 17 00:00:00 2001
From: schaffung <ssivakum@redhat.com>
Date: Sat, 9 Jan 2021 15:41:15 +0530
Subject: [PATCH 549/584] geo-rep : Change in attribute for getting function
name in py 3 (#1900)
Issue: The schedule_geo-rep script uses `func_name` to obtain
the name of the function being referred to but from python3
onwards, the attribute has been changed to `__name__`.
Code Change:
Changing `func_name` to `__name__`.
>Fixes: #1898
>Signed-off-by: srijan-sivakumar <ssivakum@redhat.com>
>Change-Id: I4ed69a06cffed9db17c8f8949b8000c74be1d717
Upstream Patch : https://github.com/gluster/glusterfs/pull/1900
BUG: 1903911
Change-Id: I4ed69a06cffed9db17c8f8949b8000c74be1d717
Signed-off-by: srijan-sivakumar <ssivakum@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/c/rhs-glusterfs/+/244570
Tested-by: RHGS Build Bot <nigelb@redhat.com>
Reviewed-by: Shwetha Acharya <sacharya@redhat.com>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
---
extras/geo-rep/schedule_georep.py.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extras/geo-rep/schedule_georep.py.in b/extras/geo-rep/schedule_georep.py.in
index ac93716..9bb3df5 100644
--- a/extras/geo-rep/schedule_georep.py.in
+++ b/extras/geo-rep/schedule_georep.py.in
@@ -102,7 +102,7 @@ def cache_output_with_args(func):
"""
def wrapper(*args, **kwargs):
global cache_data
- key = "_".join([func.func_name] + list(args))
+ key = "_".join([func.__name__] + list(args))
if cache_data.get(key, None) is None:
cache_data[key] = func(*args, **kwargs)
--
1.8.3.1