46 lines
1.6 KiB
Diff
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
|
|
|