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