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